import { createApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import HeaderComponent from "@/components/Header.vue";
import TabComponent from "@/components/Tab.vue";

import { ConfigProvider } from "vant"; // 引入vant
import "./assets/base.css";
import "amfe-flexible";
import router from "./router";
import { NoticeBar, Tab, Tabs, Sidebar, SidebarItem, Card } from "vant";
import "vant/lib/index.css";

const app = createApp(App);
// 路由引入
app.use(router);
// Vant引入
app.use(ConfigProvider);
app.use(NoticeBar);
app.use(Tabs);
app.use(Tab);
app.use(Sidebar);
app.use(SidebarItem);
app.use(Card);

// 仓库引入
app.use(createPinia());
// 挂载组件
app.component("header-component", HeaderComponent);
app.component("tab-component", TabComponent);
app.mount("#app");
